<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/main.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
<title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
	{if $site}
	<div class="content-menu ib-a blue line-x">
		<a href="{url('admin/site/')}"><em>{lang('a-men-73')}</em></a><span>|</span>
		<a href="{url('admin/site/config', array('id'=>$param['id']))}" class="on"><em>{lang('a-sit-7')}</em></a>
	</div>
	{/if}
	<div class="table-list">
		<form method="post" action="" id="myform" name="myform">
		<input name="typeid" id="typeid" type="hidden" value="{$typeid}">
		<div class="pad-10">
			<div class="col-tab">
				<ul class="tabBut cu-li">
					<li onClick="SwapTab('setting','on','',2,1);" class="{if $typeid==1}on{/if}" id="tab_setting_1">{lang('a-men-12')}</li>
					<li onClick="SwapTab('setting','on','',2,2);" id="tab_setting_2" class="{if $typeid==2}on{/if}">{lang('a-men-13')}</li>
				</ul>
				
				<div class="contentList pad-10" id="div_setting_1" style="display: none;">
				<table width="100%" class="table_form">
				<tr>
					<th width="200">{lang('a-sit-3')}： </th>
					<td><select name="data[SITE_LANGUAGE]">
					{loop $langs $t}
					{if is_dir(EXTENSION_DIR . 'language' . DIRECTORY_SEPARATOR . $t)}
					<option value="{$t}" {if $data['SITE_LANGUAGE']==$t}selected{/if}>{$t}</option>
					{/if}
					{/loop}
					</select><div class="onShow">{lang('a-cfg-73')}</div></td>
				</tr>
				<tr>
					<th>{lang('a-ind-47')}： </th>
					<td><select name="data[SITE_THEME]">
					<option value=""> -- </option>
					{$theme}
					</select><div class="onShow">{lang('a-sit-2')}</div></td>
				</tr>
				<tr>
					<th>{lang('a-ind-48')}： </th>
					<td><select name="data[SITE_TIMEZONE]">
					<option value=""> -- </option>
					<option value="-12" {if $data['SITE_TIMEZONE']=="-12"}selected{/if}>(GMT -12:00)</option>
					<option value="-11" {if $data['SITE_TIMEZONE']=="-11"}selected{/if}>(GMT -11:00)</option>
					<option value="-10" {if $data['SITE_TIMEZONE']=="-10"}selected{/if}>(GMT -10:00)</option>
					<option value="-9" {if $data['SITE_TIMEZONE']=="-9"}selected{/if}>(GMT -09:00)</option>
					<option value="-8" {if $data['SITE_TIMEZONE']=="-8"}selected{/if}>(GMT -08:00)</option>
					<option value="-7" {if $data['SITE_TIMEZONE']=="-7"}selected{/if}>(GMT -07:00)</option>
					<option value="-6" {if $data['SITE_TIMEZONE']=="-6"}selected{/if}>(GMT -06:00)</option>
					<option value="-5" {if $data['SITE_TIMEZONE']=="-5"}selected{/if}>(GMT -05:00)</option>
					<option value="-4" {if $data['SITE_TIMEZONE']=="-4"}selected{/if}>(GMT -04:00)</option>
					<option value="-3.5" {if $data['SITE_TIMEZONE']=="-3.5"}selected{/if}>(GMT -03:30)</option>
					<option value="-3" {if $data['SITE_TIMEZONE']=="-3"}selected{/if}>(GMT -03:00)</option>
					<option value="-2" {if $data['SITE_TIMEZONE']=="-2"}selected{/if}>(GMT -02:00)</option>
					<option value="-1" {if $data['SITE_TIMEZONE']=="-1"}selected{/if}>(GMT -01:00)</option>
					<option value="0" {if $data['SITE_TIMEZONE']=="0"}selected{/if}>(GMT)</option>
					<option value="1" {if $data['SITE_TIMEZONE']=="1"}selected{/if}>(GMT +01:00)</option>
					<option value="2" {if $data['SITE_TIMEZONE']=="2"}selected{/if}>(GMT +02:00)</option>
					<option value="3" {if $data['SITE_TIMEZONE']=="3"}selected{/if}>(GMT +03:00)</option>
					<option value="3.5" {if $data['SITE_TIMEZONE']=="3.5"}selected{/if}>(GMT +03:30)</option>
					<option value="4" {if $data['SITE_TIMEZONE']=="4"}selected{/if}>(GMT +04:00)</option>
					<option value="4.5" {if $data['SITE_TIMEZONE']=="4.5"}selected{/if}>(GMT +04:30)</option>
					<option value="5" {if $data['SITE_TIMEZONE']=="5"}selected{/if}>(GMT +05:00)</option>
					<option value="5.5" {if $data['SITE_TIMEZONE']=="5.5"}selected{/if}>(GMT +05:30)</option>
					<option value="5.75" {if $data['SITE_TIMEZONE']=="5.75"}selected{/if}>(GMT +05:45)</option>
					<option value="6" {if $data['SITE_TIMEZONE']=="6"}selected{/if}>(GMT +06:00)</option>
					<option value="6.5" {if $data['SITE_TIMEZONE']=="6.6"}selected{/if}>(GMT +06:30)</option>
					<option value="7" {if $data['SITE_TIMEZONE']=="7"}selected{/if}>(GMT +07:00)</option>
					<option value="8" {if $data['SITE_TIMEZONE']=="" || $data['SITE_TIMEZONE']=="8"}selected{/if}>(GMT +08:00)</option>
					<option value="9" {if $data['SITE_TIMEZONE']=="9"}selected{/if}>(GMT +09:00)</option>
					<option value="9.5" {if $data['SITE_TIMEZONE']=="9.5"}selected{/if}>(GMT +09:30)</option>
					<option value="10" {if $data['SITE_TIMEZONE']=="10"}selected{/if}>(GMT +10:00)</option>
					<option value="11" {if $data['SITE_TIMEZONE']=="11"}selected{/if}>(GMT +11:00)</option>
					<option value="12" {if $data['SITE_TIMEZONE']=="12"}selected{/if}>(GMT +12:00)</option>
					</select>&nbsp;<div class="onShow">{$string['SITE_TIMEZONE']}</div></td>
				</tr>
				<tr>
					<th>{lang('a-cfg-74')}： </th>
					<td><input name="data[SITE_MOBILE]" type="radio" value="true" {if $data['SITE_MOBILE']==true}checked{/if} /> {lang('a-open')} 
					&nbsp;&nbsp;&nbsp;<input name="data[SITE_MOBILE]" type="radio" value="false" {if empty($data['SITE_MOBILE'])}checked{/if} /> {lang('a-close')}
					<div class="onShow">{lang('a-cfg-72')}</div>
					</td>
				</tr>
				<tr>
					<th>{lang('a-ind-102')}： </th>
					<td><input class="input-text" type="text" name="data[SITE_TIME_FORMAT]" value="{$data['SITE_TIME_FORMAT']}" size="25" /><div class="onShow">{$string['SITE_TIME_FORMAT']}</div></td>
				</tr>
				<tr>
					<th>{lang('a-ind-46')}： </th>
					<td><input class="input-text" type="text" name="data[SITE_NAME]" value="{$data['SITE_NAME']}" size="25" /><div class="onShow">{$string['SITE_NAME']}</div></td>
				</tr>
				<tr>
					<th>{$string['SITE_TITLE']}： </th>
					<td><input class="input-text" type="text" name="data[SITE_TITLE]" value="{$data['SITE_TITLE']}" style="width:450px;" /></td>
				</tr>
				<tr>
					<th>{$string['SITE_KEYWORDS']}：</th>
					<td class="y-bg"><textarea name="data[SITE_KEYWORDS]" style="width:510px;height:30px;" class="text">{$data['SITE_KEYWORDS']}</textarea></td>
				</tr>
				<tr>
					<th>{$string['SITE_DESCRIPTION']}：</th>
					<td><textarea name="data[SITE_DESCRIPTION]" style="width:510px;height:40px;" class="text">{$data['SITE_DESCRIPTION']}</textarea></td>
				</tr>
				</table>
				</div>
				<div class="contentList pad-10 hidden" id="div_setting_2" style="display: none;">
				<table width="100%" class="table_form">
				<tr>
					<th width="200">{lang('a-mod-204')}： </th>
					<td><input name="data[SITE_THUMB_TYPE]" type="radio" value="1" {if $data['SITE_THUMB_TYPE']==1}checked{/if} /> {lang('a-mod-205')} 
					&nbsp;&nbsp;&nbsp;<input name="data[SITE_THUMB_TYPE]" type="radio" value="0" {if empty($data['SITE_THUMB_TYPE'])}checked{/if} /> {lang('a-mod-206')}
					<div class="onShow">{lang('a-mod-207')}</div>
					</td>
				</tr>
				<tr>
					<th>{lang('a-ind-49')}： </th>
					<td><input name="data[SITE_WATERMARK]" type="radio" value="1" {if $data['SITE_WATERMARK']==1}checked{/if} onClick="setSateType(1)"> {lang('a-ind-50')} 
					&nbsp;&nbsp;&nbsp;<input name="data[SITE_WATERMARK]" type="radio" value="2" {if $data['SITE_WATERMARK']==2}checked{/if} onClick="setSateType(2)" /> {lang('a-ind-51')} 
					&nbsp;&nbsp;&nbsp;<input name="data[SITE_WATERMARK]" type="radio" value="0" {if $data['SITE_WATERMARK']==0}checked{/if} onClick="setSateType(0)" /> {lang('a-close')}</td>
				</tr>
				<tbody id="w_0">
				<tr class="w_1">
					<th>{lang('a-ind-52')}： </th>
					<td><input class="input-text" type="text" name="data[SITE_WATERMARK_ALPHA]" value="{$data['SITE_WATERMARK_ALPHA']}" size="25" />
					<div class="onShow">{lang('a-ind-53')}</div></td>
				</tr>
				<tr class="w_1">
					<th>{lang('a-sit-1')}： </th>
					<td><select name="data[SITE_WATERMARK_IMAGE]">
						<option value=""> -- </option>
						{loop $images $t}
						{if strpos($t, '.png') !== false}
						<option value="{$t}" {if $data['SITE_WATERMARK_IMAGE']==$t}selected{/if}>{$t}</option>
						{/if}
						{/loop}
						</select>
					<div class="onShow">{lang('a-sit-0')}</div></td>
				</tr>
				<tr class="w_2">
					<th>{lang('a-ind-54')}： </th>
					<td><input class="input-text" type="text" name="data[SITE_WATERMARK_TEXT]" value="{$data['SITE_WATERMARK_TEXT']}" size="25" />
					<div class="onShow">{lang('a-ind-55')}</div></td>
				</tr>
				<tr class="w_2">
					<th>{lang('a-cfg-69')}： </th>
					<td><input class="input-text" type="text" name="data[SITE_WATERMARK_SIZE]" value="{$data['SITE_WATERMARK_SIZE']}" size="25" />
					<div class="onShow">{lang('a-cfg-70')}</div></td>
				</tr>
				<tr>
					<th>{lang('a-cfg-67')}： </th>
					<td>
					<table width="400">
					<tr>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==1}checked=""{/if} value="1" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-58')}</td>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==2}checked=""{/if} value="2" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-59')}</td>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==3}checked=""{/if} value="3" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-60')}</td>
					</tr>
					<tr>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==4}checked=""{/if} value="4" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-61')}</td>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==5}checked=""{/if} value="5" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-62')}</td>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==6}checked=""{/if} value="6" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-63')}</td>
					</tr>
					<tr>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==7}checked=""{/if} value="7" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-64')}</td>
						<td><input type="radio" {if $data['SITE_WATERMARK_POS']==8}checked=""{/if} value="8" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-65')}</td>
						<td><input type="radio" {if empty($data['SITE_WATERMARK_POS'])}checked=""{/if} value="" name="data[SITE_WATERMARK_POS]" /> {lang('a-cfg-66')}</td>
					</tr>
					</table>
					</td>
				</tr>
				</tbody>
				<tr>
					<th>{lang('a-ind-56')}： </th>
					<td>
					<input class="input-text" type="text" name="data[SITE_THUMB_WIDTH]" value="{$data['SITE_THUMB_WIDTH']}" size="6" />
					x&nbsp;
					<input class="input-text" type="text" name="data[SITE_THUMB_HEIGHT]" value="{$data['SITE_THUMB_HEIGHT']}" size="6" />
					&nbsp;px
					</td>
				</tr>
				</table>
				<script type="text/javascript">
				function setSateType(id) {
					if (id == 0) {
						$('.w_1').hide();
						$('.w_2').hide();
						$('#w_0').hide();
					} else if(id == 1) {
						$('.w_2').hide();
						$('.w_1').show();
						$('#w_0').show();
					} else if(id == 2) {
						$('.w_1').hide();
						$('.w_2').show();
						$('#w_0').show();
					}
				}
				setSateType({php echo (int)$data['SITE_WATERMARK']});
				</script>
				</div>

				<div class="bk15"></div>
				<input type="submit" class="button" value="{lang('a-submit')}" name="submit" />
			</div>
		</div>
		</form>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
$('#div_setting_{$typeid}').show();
function SwapTab(name,cls_show,cls_hide,cnt,cur){
	for(i=1;i<=cnt;i++){
		if(i==cur){
			$('#div_'+name+'_'+i).show();
			$('#tab_'+name+'_'+i).attr('class',cls_show);
			$('#typeid').val(i);
		}else{
			$('#div_'+name+'_'+i).hide();
			$('#tab_'+name+'_'+i).attr('class',cls_hide);
		}
	}
}
</script>